package Arbore;
import Visitors.Visitor;

public class Nod extends NodAbstract{
	protected NodAbstract NS;
	protected NodAbstract ND;
	protected int x;
	
	public Nod(int x){
		this.x = x;
	}
	
	public Nod(int x, NodAbstract s, NodAbstract d){
		this.x = x;
		this.NS = s;
		this.ND = d;
	}
	
	public NodAbstract getNS(){
		return NS;
	}
	
	public NodAbstract getND(){
		return ND;
	}
	
	public void setNS(NodAbstract s){
		this.NS = s;
	}
	
	public void setND(NodAbstract d){
		this.ND = d;
	}
	
	public int getX(){
		return x;
	}
	
	public void setX(int x){
		this.x = x;
	}
	
	public String toString(){
		return " "+x+" ";
	}
	
	public void acceptVisitor(Visitor v){
		v.visit(this);
	}
}
